﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Policlinica
{
    public class Employee : BusinessObjectBase
    {
        private string _surname;
        private string _name;
        private string _middlename;
        private string _post;
        private Address _Address;

        public Employee()
        {
            this._Address = default(Address);
        }

        public Employee(int id, bool isDeleted, string surname, string name, string middlename, string post, Address address)
            :base(id, isDeleted)
        {
            _surname = surname;
            _name = name;
            _middlename = middlename;
            _post = post;
            _Address = address;
        }

        public Employee(string surname, string name, string middlename, string post, Address address)
        {
            _surname = surname;
            _name = name;
            _middlename = middlename;
            _post = post;
            _Address = address;
        }

        public string Surname
        {
            get
            {
                return this._surname;
            }
            set
            {
                if ((this._surname != value))
                {
                    this._surname = value;
                }
            }
        }

        public string Name
        {
            get
            {
                return this._name;
            }
            set
            {
                if ((this._name != value))
                {
                    this._name = value;
                }
            }
        }

        public string Middlename
        {
            get
            {
                return this._middlename;
            }
            set
            {
                if ((this._middlename != value))
                {
                    this._middlename = value;
                }
            }
        }

        public string Post
        {
            get
            {
                return this._post;
            }
            set
            {
                if ((this._post != value))
                {
                    this._post = value;
                }
            }
        }      

        public Address Address
        {
            get
            {
                return this._Address;
            }
            set
            {
                Address previousValue = this._Address;
                if (previousValue != value)
                {
                    this._Address = value;
                    
                }
            }
        }

        public override string ToString()
        {
            return Surname + " " + Name + " " + Middlename;
        }

       
    }
	
}
